package com.yyge.entity;

import java.time.LocalDateTime;
import java.util.Objects;

public class Admin {
    private Integer adminId;
    private String loginName;
    private String logeinPwd;
    private Integer roleId;
    private LocalDateTime lastLoginTime;
    private String lastLoginIP;
    private Integer state;

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLogeinPwd() {
        return logeinPwd;
    }

    public void setLogeinPwd(String logeinPwd) {
        this.logeinPwd = logeinPwd;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public LocalDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getLastLoginIP() {
        return lastLoginIP;
    }

    public void setLastLoginIP(String lastLoginIP) {
        this.lastLoginIP = lastLoginIP;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Admin admin = (Admin) o;
        return Objects.equals(adminId, admin.adminId) && Objects.equals(loginName, admin.loginName) && Objects.equals(logeinPwd, admin.logeinPwd) && Objects.equals(roleId, admin.roleId) && Objects.equals(lastLoginTime, admin.lastLoginTime) && Objects.equals(lastLoginIP, admin.lastLoginIP) && Objects.equals(state, admin.state);
    }

    @Override
    public int hashCode() {
        return Objects.hash(adminId, loginName, logeinPwd, roleId, lastLoginTime, lastLoginIP, state);
    }

    @Override
    public String toString() {
        return "Admin{" +
                "adminId=" + adminId +
                ", loginName='" + loginName + '\'' +
                ", logeinPwd='" + logeinPwd + '\'' +
                ", roleId=" + roleId +
                ", lastLoginTime=" + lastLoginTime +
                ", lastLoginIP='" + lastLoginIP + '\'' +
                ", state=" + state +
                '}';
    }
}
